<p>
	<a class="buttons" href="?controller=PhotoMatrix&action=prev&imgId=<?php echo $data->images[0]->getId(); ?>&nbImg=<?php echo $data->nbImg; ?>">Prev</a>
	<a class="buttons" href="?controller=PhotoMatrix&action=next&imgId=<?php echo $data->images[0]->getId(); ?>&nbImg=<?php echo $data->nbImg; ?>">Next</a>
</p>
<?php $size = (480 / sqrt(count($data->images))); ?>
<?php foreach ($data->images as $i) : ?>
	<div class="image matrix">
		<a href="index.php?controller=Photo&action=next&imgId=<?php echo $i->getId(); ?>">
			<img src="<?php echo $i->getUrl(); ?>" width="<?php echo $size; ?>" height="<?php echo $size; ?>">
		</a>
<?php  	if( $size > 240 ) : ?>
		<div id="infosImage">
			<strong>Catégorie</strong> : <?php echo $i->getCategory(); ?><br>
			<strong>Commentaire</strong> : <?php echo $i->getComment(); ?><br>
		</div>
<?php  	endif; ?>
	</div>
<?php endforeach; ?>
<div class="fin"></div>